package com.example.edu.coupon.strategy.impl;

import com.example.edu.coupon.strategy.QuoteStrategy;

import java.math.BigDecimal;

public class DiscountQuoteStrategy implements QuoteStrategy<String> {

    @Override
    public BigDecimal quote(String discount, BigDecimal price) {
        BigDecimal k = new BigDecimal(discount);
        price = price.multiply(k);
        return price.setScale(2);
    }
}
